home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / sndpas.zip / DEMO2.PAS < prev    next >
Pascal/Delphi Source File  |  1989-03-09  |  620b  |  27 lines

  1. { Interrupt drive sound demo
  2.  
  3. Written by:
  4.  
  5.     Nels Anderson
  6.    92 Bishop Drive
  7. Framingham, MA  01701
  8.  
  9. Released to the public domain
  10. }
  11.  
  12. Uses
  13.   Crt,Dos,Sounder;
  14.  
  15. begin {Main routine}
  16.  
  17.   WriteLn('Sound Interrupt Demo');
  18.   WriteLn('Hit any key to quit...');
  19.   GetIntVec($1C,Int1CSave);        {save original interrupt vector}
  20.   SetIntVec($1C,New1CInt);        {install sound interrupt}
  21.   StartSound(@Ruddigore,99,1);        {start theme song}
  22.   repeat                {song plays...}
  23.   until KeyPressed;            {...until a key is hit}
  24.   SetIntVec($1C,Int1CSave);        {fix interrupt vector}
  25.   NoSound;                {ensure sound is now off}
  26.  
  27. end.